<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>
<@head>
</@head>
<@body>
<#--<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>-->
<#--<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>-->
<script src="/misc/app/js/lgs_batch.js"></script>
</@body>
<@layout_default>
<div class="box">
    <div class="box-header with-border">
        <span class="pull-right text-muted">共 ${pagelist.resultTotal} 条记录</span>
        <input type="hidden" id="resultTotal_hidden" value="${pagelist.resultTotal}" />
        <form class="form-inline" action="/batchsel" name="queryForm">
            <div class="input-group">
                <div class="input-group-addon">批次号</div>
                <input type="text" class="form-control" style="width: 180px" name="batchNnb" id="batchNnb" value="${batchNnb!}" placeholder="批次号"/>
            </div>
            <button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> 查询</button>
        </form>

    </div>

    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>产品名称</th>
                <th>批次号</th>
                <th>箱数</th>
                <th>瓶数</th>
                <th>扫码单位</th>
                <th>扫码地点</th>
                <th>操作类型</th>
                <th>收/发货对象</th>
                <th>操作时间</th>
            </tr>
            <#if (pagelist.result?size > 0)>
                <#list pagelist.result as item>
                    <tr>
                        <td>${item.proName!}</td>
                        <td>${item.batch_nub!}</td>
                        <td>${item.nubs!}</td>
                        <td>${item.botNums!}</td>
                        <td>${item.scanCompanyName!}</td>
                        <td>${item.depotName!}</td>
                        <td>${item.nodeName!}</td>
                        <td>
                            <#if item.nodeType?exists>
                                <#if item.nodeType==1>
                                     ${item.to!}
                                <#elseif item.nodeType==2>
                                    ${item.from!}
                                </#if>
                            </#if>
                        </td>
                        <td>${item.scan_time?number_to_datetime}</td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="text-center text-muted" colspan="6"><i class="fa fa-info-circle"></i> 没有记录</td>
                </tr>
            </#if>

        </table>
        <table class="table table-striped table-hover">
            <tr>
                <td colspan="13" style="text-align:right;background-color:white;">
                    <a href="javascript:void(0);" id="btn_export"><i class="glyphicon glyphicon-save"></i> 数据导出</a>
                </td>
            </tr>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
        <@components.pagination "/batchsel?batchNnb=${batchNnb!}&page=$page",pagelist.page,pagelist.pageTotal/>
    </div>
</div>
</@layout_default>